
export default {
    data() {
       return {
            share:{
               title: '',
               imageUrl:'',
			   path: ''
            }
       }
    },
    onShareAppMessage(res) { //发送给朋友
	var pathIndex = ''
	if(!this.share.path && this.$store.state.userInfo){ 
		pathIndex = '/pagesLogin/index?invitation_code=' + this.$store.state.userInfo.invitation_code
	}else{
		pathIndex = '/pagesLogin/index'
	}
	var path = this.share.path ? this.share.path : pathIndex
        return {
            title: this.share.title,
            imageUrl: this.share.imageUrl,
			path
        }
    },
    onShareTimeline(res) {//分享到朋友圈
	var pathIndex = ''
	if(!this.share.path && this.$store.state.userInfo){
		pathIndex = '/pagesLogin/index?invitation_code=' + this.$store.state.userInfo.invitation_code
	}else{
		pathIndex = '/pagesLogin/index'
	}
	var path = this.share.path ? this.share.path : pathIndex
        return {
            title: this.share.title,
            imageUrl: this.share.imageUrl,
			path
        }
    },
}